{{- $version := "9.2.5" }}
---
image: {{ $.ModuleName }}/{{ $.ImageName }}
from: {{ $.Images.BASE_SCRATCH }}

import:
  - artifact: {{ $.ModuleName }}/{{ $.ImageName }}-artifact
    add: /
    to: /
    includePaths:
      - drbd
      - install
      - uninstall
    before: setup
docker:
  LABEL:
    distro: all
    version: all
    drbd: {{ $version }}
---
artifact: {{ $.ModuleName }}/{{ $.ImageName }}-artifact
from: {{ $.Images.BASE_ALPINE }}

git:
  - url: https://github.com/LINBIT/drbd/
    add: /
    to: /drbd
    tag: drbd-{{ $version }}
  - add: /{{ $.ModulePath }}modules/007-{{ $.ModuleName }}/images/{{ $.ImageName }}/scripts
    to: /scripts
shell:
  setup:
    - mv /scripts/* /
    - chmod +x /install
    - chmod +x /uninstall
    - echo 'GIT-hash:123456' > /drbd/drbd/.drbd_git_revision
    - sed -e "s/\<curl\>/d8-curl -k/g" -i /drbd/drbd/drbd-kernel-compat/gen_compat_patch.sh
